This invention generally relates to computer system performance monitoring. More specifically, the invention relates to event-based sampling to monitor computer system performance.
Computer system performance measurement enables detection of issues that can result in reduced throughput of the computer system. One approach to measuring performance is to repeatedly execute workload instruction streams, which are often segments of customer workload code that stress particular hardware and/or software functions, and collect data relevant to the system's performance. Initially, hardware captures selected signals and stores them for further analysis. Each group of the selected signals is called a “sample” that is associated with executing an instruction. Each sample can contain various information about processor state for performance evaluation, such as process ID, virtual storage address, op-code and information about activity associated with the instruction (delays, caching, etc.). The captured data are later used for calculating performance analysis metrics such as cycles per instruction (CPI), cache misses/hits, pipeline stalls, and the like. Basic mechanisms for data capturing and performance measurement, also referred to as “instrumentation”, are described in U.S. U.S. Pat. Nos. 4,590,550, and 4,821,178, each of which is hereby incorporated herein by reference in its entirety.
For instrumentation, it is desirable to start collecting data on a time increment and to capture a set of data on regular time intervals. During a typical instrumentation run, controls are set to collect data on a time interval. Each time the interval expires, the instrumentation signals are captured and saved. As an example, the sampling interval may be set to ensure that 5 million samples in the computer system image of interest are collected during a 6-10 minute measurement window.
A major drawback to this existing approach is that running instrumentation entails capturing large amounts of data, with only a limited amount of data being of interest to calculate performance metrics. Thus, current approaches to instrumentation may require post-processing tools to filter out data of interest from the large volume of data. As computer system processor speeds continue to increase in the multi-gigahertz range with heavily pipelined architectures, difficulties in correlating specific events to samples, as well as storing (logging out) the large volume of data, are also increasing. Pipelining can result in misalignment between control signals for sampling and event signals within the samples.
It would be beneficial to allow instrumentation data to be captured using a time based approach that also corresponds to an event. Additionally, it would be advantageous to reduce the volume of data collected by logging out a sample after a predetermined number of events are detected. Accordingly, there is a need in the art for event-based sampling to monitor computer system performance.